package com.cloudlead.common.lang;

public class SimpleModule implements Module {
    protected BusinessModule module;
    /**
     * 模块是否启用，默认是启用的
     */
    protected boolean enabled = true;

    public SimpleModule(BusinessModule module) {
        super();
        this.module = module;
    }

    @Override
    public BusinessModule getModule() {
        return module;
    }

    @Override
    public boolean isEnabled() {
        return enabled;
    }

    @Override
    public void enable() {
        enabled = true;
    }

    @Override
    public void disable() {
        enabled = false;
    }
}
